"""
学习datetime库
"""
import datetime
# 调用datetime包下的datetime类的now()函数
today = datetime.datetime.now()
# 2025-03-26 10:45:08.396999
print(today)
day = today.day
month = today.month
hour = today.hour
print(f'今天是这个月的第 {day} 天, 这个月是今天的第 {month} 个月,现在是今天的第 {hour} 个小时')
today_formatter = today.strftime('%Y年%m月%d日')
print(today_formatter)
